fix: updated variable name #75
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request includes several changes to update the configuration for Application Insights from using the instrumentation key to using the connection string. The most important changes include updates to environment variables, configuration files, and application code.
Updates to environment variables and configuration files:
README.md: Changed the environment variable fromAPPLICATIONINSIGHTS_INSTRUMENTATION_KEYtoAPPLICATIONINSIGHTS_CONNECTION_STRING.deploy/macae-continer-oc.json: Updated the parameter name fromAPPLICATIONINSIGHTS_INSTRUMENTATION_KEYtoAPPLICATIONINSIGHTS_CONNECTION_STRING.deploy/macae-continer.bicep: Changed the configuration to useAPPLICATIONINSIGHTS_CONNECTION_STRINGinstead ofAPPLICATIONINSIGHTS_INSTRUMENTATION_KEY.src/backend/.env.sample: ReplacedAPPLICATIONINSIGHTS_INSTRUMENTATION_KEYwithAPPLICATIONINSIGHTS_CONNECTION_STRING.Updates to application code:
src/backend/app.py: Modified the code to retrieveAPPLICATIONINSIGHTS_CONNECTION_STRINGinstead ofAPPLICATIONINSIGHTS_INSTRUMENTATION_KEYfrom environment variables.src/backend/event_utils.py: Updated the function to useAPPLICATIONINSIGHTS_CONNECTION_STRINGfor tracking events.Updates to tests:
src/backend/tests/agents/test_human.py: Changed the test setup to useAPPLICATIONINSIGHTS_CONNECTION_STRINGinstead ofAPPLICATIONINSIGHTS_INSTRUMENTATION_KEY. [1] [2]src/backend/tests/test_app.py: Updated the environment variable in tests to useAPPLICATIONINSIGHTS_CONNECTION_STRING.Does this introduce a breaking change?